package com.mall.dubbo.api;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mall.dubbo.mapper.OmsOrderItemMapper;
import com.mall.model.domain.OmsOrderItem;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @author xyiaao
 * @description 针对表【oms_order_item(订单中所包含的商品)】的数据库操作Api实现
 * @createDate 2022-03-29 19:46:09
 */
@DubboService
public class OmsOrderItemApiImpl extends ServiceImpl<OmsOrderItemMapper, OmsOrderItem>
        implements OmsOrderItemApi {

    @Autowired
    private OmsOrderItemMapper omsOrderItemMapper;


    @Override
    public List<OmsOrderItem> listByOrderId(Long orderId) {

        LambdaQueryWrapper<OmsOrderItem> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(OmsOrderItem::getOrderId, orderId);
        return omsOrderItemMapper.selectList(queryWrapper);
    }

}




